Method of sequencing image data inside memory of optical scanning device

ABSTRACT

An image data sequencing method for a memory unit inside an optical scanning device. The image data sequencing method is particularly suitable for scanning a line of pixels with each pixel comprising a plurality of primary colors. The image data sequencing method involves scanning a line of pixels to obtain the data for a primary or secondary color. The pixels within the scan line are subdivided into groups. A storage space is reserved both before and after the address space inside the memory unit for holding the scanned primary or secondary color data so that all the primary or secondary color data constituting a pixel are in a fixed sequence next to each other inside the memory unit. When all the primary or secondary color data of pixels within a group are secured, the group of data is released from the memory unit.

BACKGROUND OF THE INVENTION

[0001] 1. Field of Invention

[0002] The present invention relates to a method of sequencing datainside the memory of an optical scanning device. More particularly, thepresent invention relates to a method of sequencing image data insidethe memory of an optical scanner.

[0003] 2. Description of Related Art

[0004]FIG. 1 is a block diagram showing the structural connection ofvarious components inside a conventional optical scanning device. Asshown in FIG. 1, the optical scanning device includes a charge-coupleddevice (CCD) 110, a multiplexer 120, an amplifier 130, ananalogue-to-digital converter 140 and a buffer memory unit 150. In ascanning operation, the charge-coupled device 110 scans the brightnesslevel of a scan object and converts the brightness level into ananalogue voltage signal. The analogue voltage signal is output to theamplifier 130 according to the color sequence. The amplifier 130amplifies the analogue voltage signal and passes the amplified signal tothe analogue-to-digital converter 140. The analogue-to-digital converter140 converts the amplified analogue voltage signal to a digital voltagesignal and stores it inside the buffer memory unit 150.

[0005] According to the aforementioned data output and conversionsystem, if the line difference between sequential sensing rows for eachcolor in the charge-coupled device 110 is k and the number of pixels isn, the digital voltage signals inside the buffer memory unit 150 arestored in a manner shown in FIG. 2. As shown in FIG. 2, Rij representsthe brightness level of red color in the i^(th) column and the j^(th)pixel, Gij represents the brightness level of green color in the i^(th)column and the j^(th) pixel and Bij represents the brightness level ofblue color in the i^(th) column and the j^(th) pixel.

[0006] In a conventional scanning system, the data stored up insidebuffer memory unit 150 may be processed in two possible schemes. Thedata inside the buffer memory unit 150 may be directly output to a hostcomputer or the data may be processed so that the color of variouspixels are rearranged before outputting. Although the buffer memory unit150 may output data a lot faster if the former scheme is used, necessaryprocessing of image data inside the host computer is greatly increased.On the other hand, although the amount of processing inside the hostcomputer is very much simplified in the latter scheme, data outputtingrate from the buffer memory unit 150 slows down considerably. In otherwords, conventional image data sequencing methods lead to eitherpost-processing complications or a slow down of the data transfer ratefrom the memory unit to the host system.

SUMMARY OF THE INVENTION

[0007] Accordingly, one object of the present invention is to provide animage data sequencing method for a memory unit inside an opticalscanning device. The method is able to reduce post-processingcomplications inside a host system and at the same time increase datatransfer rate from the memory unit to the host system.

[0008] To achieve these and other advantages and in accordance with thepurpose of the invention, as embodied and broadly described herein, theinvention provides an image data sequencing method for a memory unitinside an optical scanning device. The image data sequencing method isparticularly suitable for scanning a line containing a plurality ofpredefined areas, referred to as pixels, wherein each pixel comprises aplurality of primary colors. The image data sequencing method involvesthe following steps. First, a line of pixels is scanned to obtain allthe data for one of the primary colors. The pixels that make up the scanline are subdivided into groups. Inside the memory unit, a storage spaceis reserved both before and after the scanned primary color data addressspace so that all the primary color data constituting a pixel are in afixed sequence next to each other inside the memory unit. When all theprimary color data of pixels within a group are secured, the group ofdata is released from the memory unit.

[0009] This invention also provides a second image data sequencingmethod for a memory unit inside an optical scanning device. The imagedata sequencing method includes the following steps. First, a line isscanned to obtain a plurality of pixel data. The pixels are divided intoa few groups and stored inside the memory unit. As soon as all pixeldata within a group is secured and the primary colors constituting thesepixels are all arranged in a fixed order, pixel data belonging to thegroup is released from the memory unit.

[0010] This invention also provides a third image data sequencing methodfor a memory unit inside an optical scanning device. The image datasequencing method is particularly suitable for scanning a line of pixelswith each pixel comprising a plurality of primary colors. The image datasequencing method involves the following steps. First, a line of pixelsis scanned to obtain all the pixel data for one of the primary colors.All the odd pixels of the scanned line are gathered to form a firstgroup and all the even pixels of the scanned line are gathered to form asecond group. When the first or the second group of pixel data is storedinside the memory unit, storage space is reserved both in front of andbehind the scanned primary color data address space. Hence, all theprimary color data belonging to the same pixel are in a fixed sequencenext to each other inside the memory unit. When all the primary colordata of pixels within the first group or the second group are secured,data belonging to the group is released from the memory unit.

[0011] In brief, after securing constituent data (brightness level ofvarious primary colors) necessary for setting a pixel, the data arerearranged in a specified sequence and stored inside the memory unit.The data are then released from the memory unit directly. With thisarrangement, there is no need to conduct additional processing outsidethe memory unit, so that a relatively fast data transfer rate can bemaintained. Furthermore, since the data is sequenced before release fromthe memory unit, post-processing of the image is greatly simplified.

[0012] It is to be understood that both the foregoing generaldescription and the following detailed description are exemplary, andare intended to provide further explanation of the invention as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are included to provide a furtherunderstanding of the invention, and are incorporated in and constitute apart of this specification. The drawings illustrate embodiments of theinvention and, together with the description, serve to explain theprinciples of the invention. In the drawings,

[0014]FIG. 1 is a block diagram showing the structural connection ofvarious components inside a conventional optical scanning device;

[0015]FIG. 2 is a diagram showing the image data sequencing method usedby the memory unit of a conventional optical scanning device; and

[0016]FIGS. 3A to 3C are three different data storage configurationsinside the memory unit of an optical scanning device according to animage data sequencing method of this invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0017] Reference will now be made in detail to the present preferredembodiments of the invention, examples of which are illustrated in theaccompanying drawings. Wherever possible, the same reference numbers areused in the drawings and the description to refer to the same or likeparts.

[0018]FIGS. 3A to 3C are three different data storage configurationsinside the memory unit of an optical scanning device according to animage data sequencing method of this invention. Although the threeprimary colors including red, green and blue (labeled as R, G and B) arethe image data to be retrieved in this scanning operation, the sameprinciples also apply to the secondary colors magenta, yellow and cyan.In addition, various row sensors in an optical scanner for scanning adocument are ordered in the sequence red, green, blue and differentprimary colors are separated from each other by k lines. Again, althoughimage data of various primary colors are divided up into odd pixels oreven pixels in this invention, there is no reason to restrict the numberof divisions to two as such.

[0019]FIG. 3A shows the data sequence arrangement in the memory unit fora condition such that the row of red sensors have just passed over ascan document but the row of green sensors and the row of blue sensorshave not yet reached the scanning position. As shown in FIG. 3A, whenthe row of red sensors scans the document, image data representing theprimary color red and labeled R₁₁, R₁₂, R₁₃ up to R_(k(2n)) are storedinside the memory unit first. The lower index k and 2n of R representsthe 2n^(th) image data point in the k^(th) column. For example, R¹¹represents the first image data point for the primary color red in thefirst column while R₁₂ represents the second image data point for theprimary color red in the first column.

[0020] As soon as the scanning operation is initialized, the red imagedata of the odd numbered pixels in the first column are the first groupof data to be stored inside the memory unit. In other words, image dataR¹¹, R₁₃, R₁₅ up to R_(1(2n−1)) are transferred to the memory unit firstas shown in FIG. 3A. Next, the red image data of the odd numbered pixelsin the second column and the red image data of the even numbered pixelsin the first column are scanned and transferred to the memory unit. Thatmeans, image data R₂₁, R₂₃, R₂₅ up to R_(2(2n−1)) and image data R₁₂,R₁₄, R₁₆ up to R_(1(2n)) are transferred to the memory unit next asshown in FIG. 3A. According to this invention, empty spaces are alsoreserved in the memory unit for holding the data of two other primarycolors. For example, memory spaces N₁₁ and M₁₁ are reserved right afterthe space R₁₁ for holding the primary color red. Here, N and M representmemory space for holding the data of the primary color green and thedata of the primary color blue respectively. Because the sensor rows ofdifferent primary colors are separated from each other by k lines, datafor the primary colors green and blue remain to be written into thememory unit when the data of the primary color red in the k^(th) line istransferred to the memory unit.

[0021]FIG. 3B shows the data sequence arrangement in the memory unit fora condition after FIG. 3A such that the row of green sensors have justpassed over a scan document but the row of blue sensors have not yetreached the scanning position. Similarly, G₁₁ represents the first imagedata point for the primary color green in the first column while G₁₂represents the second image data point for the primary color green inthe first column. As shown in FIG. 3B, image data corresponding to thesecond primary color (green in this embodiment) is placed behind a slotfor holding the image data corresponding to the first primary color (redin this embodiment). In other words, image data of the primary colorgreen is sequentially transferred to the specially reserved memory spaceN₁₁, N₁₂, N₁₃ up to N_(k(2n)) shown in FIG. 3A according to the positionof the scan document.

[0022]FIG. 3B also shows storage spaces R_((k+1)1), R_((k+1)(2n−1)) upto R_((2k)(2n)) for holding image data for the primary color red and thereserved storage spaces N_((k+1)1) to N_((2k)(2n)) and M_((k+1)1) toM_((2k)(2n)) aside from the ones shown in FIG. 3A. Because the sensorrows of different primary colors are separated from each other by klines, data for the primary color green and blue remain to be writteninto the memory space from the k^(th) to the 2k^(th) line of the memoryunit when the data of the primary color red in the 2k^(th) line istransferred to the memory unit.

[0023]FIG. 3C shows the data sequence arrangement in the memory unit fora condition following FIG. 3B after the sensing row for the thirdprimary color (blue in this embodiment) has just passed over a scandocument. As shown in FIG. 3A, when the row of blue sensors scans thefirst line on the document, image data representing the primary colorblue are transferred to reserved storage spaces. In other words, imagedata of the primary color blue scanned from the first line of thedocument is transferred to locations B₁₁, B₁₂ up to B_(1(2n)) as shownin FIG. 3C. Required image data that constitutes the first line iscomplete after the image data for the primary color blue on the firstline is transferred to the memory unit. Thereafter, the first line imagedata stored inside the memory unit is transferred out to a host systemfor further image processing.

[0024] Linear optical sensors are used to scan a document according tothe embodiment of this invention. In other words, one row of sensors isresponsible for scanning a primary color. Hence, image data in the oddand the even-numbered pixels are extracted simultaneously. However,staggered optical sensors may also be used such that the odd-numberedpixels and the even-numbered pixels are alternately sensed. If theodd-numbered pixels are scanned first followed by the even-numberedpixels, odd-numbered pixel image data of the primary color blue B11, B13up to B1(2n−1) as shown in FIG. 3C are secured first. Since a completeset of image data for the odd-numbered pixels is stored inside thememory unit, image data of the odd-numbered pixels may be transferredfrom the memory unit to the host system first. Image data of theeven-numbered pixels are transferred to the host system only after thememory unit has similarly obtained a full set of image data for theeven-numbered pixels.

[0025] This invention separates each line of image data into severalportions inside a memory unit so that a complete set of data in oneparticular portion may be transferred in sequence to a host system forfurther processing without having to wait for a full set of image data.Hence, memory space inside the scanning device is saved. Moreover, aslong as the host system follows the image data assembling sequence asdefined by the memory unit, the host system need not spend any time tosequence the primary color sequence of various pixel image data.

[0026] It will be apparent to those skilled in the art that variousmodifications and variations can be made to the structure of the presentinvention without departing from the scope or spirit of the invention.In view of the foregoing, it is intended that the present inventioncover modifications and variations of this invention provided they fallwithin the scope of the following claims and their equivalents.

What is claimed is:
 1. A method of sequencing the image data inside thememory unit of an optical scanning device, wherein the method isparticularly suitable for scanning a line containing a plurality ofpixels, wherein each pixel comprises a plurality of primary or secondarycolors, the image data sequencing method comprising the steps of:scanning a line to obtain all the pixel data for one of the primary orsecondary colors; dividing the scanned data into a first groupcontaining all the odd-numbered pixel data and a second group containingall the even-numbered pixel data; sending the first group of pixel dataor the second group of pixel data to the memory unit and reserving astorage space both in front of and behind the retrieved primary orsecondary color address space so that all the primary or secondary colordata constituting a pixel can be arranged in a fixed sequence next toeach other inside the memory unit; and submitting the pixel data of theprimary or secondary colors after a full set of the primary or secondarycolors belonging either to the first group or the second group isaccumulated inside the memory unit, wherein the primary colors includered, green and blue; and wherein the secondary colors include magenta,yellow and cyan.
 2. A method of sequencing data inside the memory unitof an optical scanning device, comprising the steps of: dividing thedata obtained by scanning a line of pixels into groups and sending thedata to the memory unit; and sending out all the pixel data belonging toa group after the memory unit has accumulated all the pixel data of thegroup and the data of all primary or secondary colors constituting eachpixel arranged in a fixed sequence inside the memory unit.
 3. Thesequencing method of claim 2, wherein the step of dividing the scanneddata into groups includes the sub-steps of: gathering all theodd-numbered pixel data together to form a group; and gathering all theeven-numbered pixel data together to form another group.
 4. Thesequencing method of claim 2, wherein the primary colors include red,green and blue and wherein the secondary colors include magenta, yellowand cyan.
 5. The sequencing method of claim 2, wherein the step ofstoring a group of data inside the memory unit further includes thesub-steps of: securing all the pixel data of one primary or secondarycolor; and reserving a storage space both before and after the securedprimary or secondary color data address space so that all the primary orsecondary colors constituting a pixel are in a fixed sequence next toeach other within the memory unit.
 6. A method of sequencing the imagedata inside the memory unit of an optical scanning device, wherein themethod is particularly suitable for scanning a line of pixels with eachpixel comprising a plurality of primary or secondary colors, the imagedata sequencing method comprising the steps of: securing all the pixeldata from the scan line belonging to one primary or secondary color;dividing the pixels of the scanned line into groups; reserving a storagespace both before and after the address space for holding the securedprimary or secondary color data so that all the primary or secondarycolors constituting a pixel are in a fixed sequence next to each otherwithin the memory unit; and sending out the pixel data of the primary orsecondary colors after a full set of the primary or secondary colorsbelonging to one of the groups is accumulated inside the memory unit. 7.The sequencing method of claim 6, wherein the step of dividing thescanned data into groups includes the sub-steps of: gathering all theodd-numbered pixel data together to form a group; and gathering all theeven-numbered pixel data together to form another group.
 8. Thesequencing method of claim 6, wherein the primary colors include red,green and blue and wherein the secondary colors include magenta, yellowand cyan.